package myschool;

public class Student implements Content{
    private String name;
    private int year;
    private String companyName;
    private int money;

    public Student(String name, int year, String companyName, int money) {
        this.name = name;
        this.year = year;
        this.companyName = companyName;
        this.money = money;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public String getInfo() {
        StringBuffer sb = new StringBuffer();
        sb.append("学生名称：").append(this.getName()).append("\n\t")
                .append("毕业年份：").append(this.getYear()).append("年\n\t")
                .append("就职公司：").append(this.getCompanyName()).append("\n\t")
                .append("薪资待遇：").append(this.getMoney()).append("\n");
        return sb.toString();
    }
}
